<template>
  <div>
    <el-container  style="height: 700px; border: 3px solid #eee">
      <el-header  style="text-align: center;height : 70px; font-size: 35px">学生管理系统</el-header>
      <el-container>
        <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
          <el-menu :default-openeds="['1', '3']">
            <el-submenu index="1">
              <template slot="title"><i class="el-icon-message"></i>系统信息管理</template>
              <el-menu-item-group>
                <el-menu-item index="1-1">
                  <router-link to="/info">
                    学生信息
                  </router-link>
                </el-menu-item>
                <el-menu-item index="1-2">
                  <router-link to="/score">
                    学生成绩
                  </router-link>
                </el-menu-item>
              </el-menu-item-group>

            </el-submenu>


          </el-menu>
        </el-aside>

        <el-main>

          <el-table :data="tableData" border>
            <el-table-column prop="studentid" label="学号" width="140">
            </el-table-column>
            <el-table-column prop="courseid" label="课程id" width="120">
            </el-table-column>
            <el-table-column prop="session" label="入学年份">
            </el-table-column>
            <el-table-column prop="score" label="分数">
            </el-table-column>
            <el-table-column label = "操作">
              <el-button type="primary" size="mini">编辑</el-button>
              <el-button type="danger" size="mini">删除</el-button>
            </el-table-column>
          </el-table>
          <br>
          <el-pagination
              background
              layout="total,sizes,prev, pager, next,jumper"
              :total="1000">
          </el-pagination>
        </el-main>
      </el-container>
    </el-container>
  </div>


</template>
<script>
import axios from "axios";
export default {
  data(){
    return {
      tableData:[],
      search: {
        name:"",
        sex:"",
        birthday:[]
      },
    }
  },
  mounted(){
    axios.get("/api/sco").
    then((result) => {this.tableData = result.data.data;})
  }

}
</script>
<style>

</style>

